

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="sj" tagdir="/WEB-INF/tags/spring-jquery-tags"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<script type="text/javascript">
	$(document).ready(function(){
		$('table.tablesorter').tablesorter({widgets: ['zebra'], sortList: [[0,0], [1,0]], headers: { 11: { sorter: false}, 12: {sorter: false} }});
		
		$('.edit-paymentrequest-link').click(function(){
			loadDiv('content', 'showEditPaymentrequest.do?id='+$(this).attr('paymentrequestId'));
		});
	});
</script>	

<div id="paymentrequestListDiv" class="hastable" style="overflow: auto">
	<table class="tablesorter">
		<thead>
			<tr>
				<th><spring:message code="paymentrequestList.table.heading.paymentIdentifiedInformation"/></th>
				<th><spring:message code="paymentrequestList.table.heading.receivedFromAccountingDate"/></th>
				<th><spring:message code="paymentrequestList.table.heading.createdBy"/></th>
				<th><spring:message code="paymentrequestList.table.heading.paymentrequesttype"/></th>
				<th><spring:message code="paymentrequestList.table.heading.paymentmethod"/></th>	
				<th><spring:message code="paymentrequestList.table.heading.payee"/></th>	
				<th><spring:message code="paymentrequestList.table.heading.purposeOfExpenditure"/></th>
				<th><spring:message code="paymentrequestList.table.heading.specialInstructions"/></th>
				<th><spring:message code="paymentrequestList.table.heading.invoiceRequestDate"/></th>
				<th><spring:message code="paymentrequestList.table.heading.paymentConfirmationNumber"/></th>	
				<th><spring:message code="paymentrequestList.table.heading.dateToFinanace"/></th>
				<th><spring:message code="paymentrequestList.table.heading.statusCode"/></th>								
				<th><spring:message code="paymentrequestlist.table.heading.edit"/></th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${paymentrequests}" var="paymentrequest">
				<tr>
					<td>${paymentrequest.paymentIdentifiedInformation}</td>
					<td>${paymentrequest.receivedFromAccountingDate}</td>
					<td>${paymentrequest.createdBy.fullName}</td>
					<td>${paymentrequest.paymenttype.displayName}</td>
					<td>${paymentrequest.paymentmethod}</td>
					<td>${paymentrequest.payee.payeeName}</td>
					<td>${paymentrequest.purposeOfExpenditure}</td>
					<td>${paymentrequest.specialInstructions}</td>
					<td>${paymentrequest.invoiceRequestDate}</td>
					<td>${paymentrequest.paymentConfirmationNumber}</td>					
					<td>${paymentrequest.dateToFinanace}</td>
					<td>${paymentrequest.statusCode}</td>
					<td><a href="javascript://" class="edit-paymentrequest-link" paymentrequestId="${paymentrequest.id}"><spring:message code="paymentrequestlist.table.link.edit"/></a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div id="paymentrequestListPager"></div>
</div>


